<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

<h:head>
   <title>Modifica Profilo</title>
</h:head>
<h:body>
<div id="spaziatura">
	<full_page id="main">
	
	<!-- 		HEADER -->
			<div>
						<img src="../resources/Images/Banner.png" id="bannerTop"></img>
			</div>
			<!-- 		HEADER -->
			<div>
						<img src="../resources/Images/Banner_piccolo.png" id="bannerBottom_sx"></img>
			</div>

			<div>
						<img src="../resources/Images/Logo_td_big.png" id="logoTD"></img>
			</div>

			<div>
						<img src="../resources/Images/Banner_piccolo_dx.png" id="bannerBottom_dx"></img>
			</div>
			
			<div>
						<img src="../resources/Images/Bg.png" id="background"></img>
			</div>
			
			<div>
						<img src="../resources/Images/usersil.png" id="minilogo_user"></img>
			</div>
			
	<!--TITOLO E SOTTOTITOLO-->
		<title_box>
		<title_TD>TravelDream</title_TD>
		</title_box>
		<!--FINE TITOLO E SOTTOTITOLO-->
		
		    <box_login>
				<yellow_text id="topRightReg">User Section</yellow_text>
      		</box_login>
      		
	<full_page id="menuTop_con_banner">
	<!-- 	MENUBAR -->

		<p:menubar autoDisplay="false">
		
				<p:menuitem value="Compra Pacchetto Predefinito" url="SelPacchettoPred.xhtml"/>
			<p:submenu label="Crea Pacchetto Personalizzato">
				<p:menuitem value="Parti da un pacchetto predefinito" url="PPers.xhtml"/>
				<p:menuitem value="Parti da zero" url="reaPPers.xhtml"/>
			</p:submenu>
				<p:menuitem value="Pacchetti Acquistati" url="ViewPacComprato.xhtml"/>
				<p:menuitem value="Gift List" url="ViewPacGL.xhtml"/>
				<p:menuitem value="Fai Un Regalo!" url="regalaGL.xhtml"/>
				<p:menuitem value="Home" url="index.xhtml"/>
		</p:menubar>
	
<!-- 	MENUBAR -->
	<form onsubmit="#{modUser.findUser(userBean.email)}">
	  <p:growl id="growl" showDetail="true" sticky="true" /> 
		<h:panelGrid columns="3" id="regGrid">
			<yellow_text><underLined>Email:</underLined></yellow_text>
			<p:inputText id="email" value="#{modUser.UDTO.email}" disabled="true"/>
			<p:message for="email"  />

			<yellow_text><underLined>First name:</underLined></yellow_text>
			<p:inputText id="firstName" value="#{modUser.name}" />
			<p:message for="firstName" />
			
			<yellow_text><underLined>Last name:</underLined></yellow_text>
			<p:inputText id="lastName" value="#{modUser.surname}" />
			<p:message for="lastName" />
			
			<yellow_text><underLined>Old Password:</underLined></yellow_text>
			<p:password id="Oldpassword" value="#{modUser.oldP}" label="Password"/>
			<p:message for="Oldpassword" />
			
			<yellow_text><underLined>New Password:</underLined></yellow_text>
			<p:password id="Newpassword" value="#{modUser.newP}"
				feedback="true" label="Password"/>
			<p:message for="Newpassword" />

			<yellow_text><underLined>Confirm New Password:</underLined></yellow_text>
			<p:password id="pwd2" label="Confirm Password" value="#{modUser.newP2}"/>
		</h:panelGrid>
		
		<p:commandButton  value="Modifica!" action="#{modUser.ModificaUser()}" update="growl"/>
	</form>
	
	
	</full_page>
	
	
	</full_page>
	
</div>
<h:outputStylesheet library="css" name="css_rules_plain_links.css" />
</h:body>
</html>